import request from '@/utils/request'

export function getAllLeaveInfo() {
  return request({
    url: `/student/leave/get/all`,
    method: 'get'
  })
}

export function getAllNon_CheckedLeaveInfo() {
  return request({
    url: `/student/leave/get/checked`,
    method: 'get'
  })
}

export function getAllNon_ReportLeaveInfo() {
  return request({
    url: `/student/leave/get/report`,
    method: 'get'
  })
}

export function getAllFinishLeaveInfo() {
  return request({
    url: `/student/leave/get/finish`,
    method: 'get'
  })
}

export function addNewLeaveInfo(data) {
  return request({
    url: `/student/leave/add`,
    method: 'post',
    data
  })
}

export function checkedAgreeLeaveInfo(identifier) {
  return request({
    url: `/student/leave/check/agree/${identifier}`,
    method: 'put'
  })
}

export function checkedRefuseLeaveInfo(identifier) {
  return request({
    url: `/student/leave/check/refuse/${identifier}`,
    method: 'put'
  })
}

export function reportLeaveInfo(identifier) {
  return request({
    url: `/student/leave/report/${identifier}`,
    method: 'put'
  })
}
